import Vue from 'vue'
import VueRouter from 'vue-router'
import CampusBinhai from '../views/CampusBinhai.vue'
import CampusChashan from '../views/CampusChashan.vue'
import Building5 from '../views/Building5.vue'
import Building6 from '../views/Building6.vue'
import Building7 from '../views/Building7.vue'
import StudentSystem from '../views/StudentSystem.vue'
import CampusLeqing from '../views/Campusleqing.vue' // 修改: 文件名改为小写

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: CampusBinhai // 设置为首页
  },
  {
    path: '/campus-chashan',
    name: 'campus-chashan',
    component: CampusChashan,
    children: [
      {
        path: 'building5',
        component: Building5
      },
      {
        path: 'building6',
        component: Building6
      },
      {
        path: 'building7',
        component: Building7
      }
    ]
  },
  {
    path: '/student-system',
    name: 'student-system',
    component: StudentSystem
  },
  {
    path: '/leqing', // 新增: 添加乐清校区路由
    name: 'leqing',
    component: CampusLeqing
  }
]

const router = new VueRouter({
  routes
})

export default router